package com.github.tvbox.osc.util

/**
 * @ClassName: MediaUtil
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author: huangrongcai
 * @date: 2024/8/22
 *
 * @Copyright: 黄嵘才（HuangRc)
 */
class MediaUtil {
    companion object {
        @JvmStatic
        fun getMediaType(url: String): String {
            return if (url.endsWith(".mp4")) {
                "video/mp4"
            } else if (url.endsWith(".m3u8")) {
                "application/x-mpegURL"
            } else if (url.endsWith(".ts")) {
                "video/mp2t"
            } else {
                "video/mp4"
            }
        }
    }

}